package br.com.canvasForAll.model.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

@Entity
@Table(name = "USUARIO")
@NamedQueries(value = {
		@NamedQuery(name = "Usuario.pesquisa", query = "SELECT u FROM Usuario u"),
		@NamedQuery(name = "Usuario.duplicata", query = "SELECT COUNT(u) FROM Usuario u WHERE u.login = :login")
})
public class Usuario implements Serializable {
	
	private static final long serialVersionUID = 3171607838518661462L;

	@Id
	@Column(name = "id", unique = true, nullable = false)
	private Long id;
	
	@Column(name = "LOGIN")
	private String login;
	
	@Column(name = "SENHA")
	private String senha;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getLogin() {
		return login;
	}

	public void setLogin(String login) {
		this.login = login;
	}

	public String getSenha() {
		return senha;
	}

	public void setSenha(String senha) {
		this.senha = senha;
	}

}
